home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gwuada_9.zip / GENOP.H < prev    next >
C/C++ Source or Header  |  1992-10-05  |  1KB  |  47 lines

  1. /*
  2.  * Copyright (C) 1985-1992  New York University
  3.  * 
  4.  * This file is part of the Ada/Ed-C system.  See the Ada/Ed README file for
  5.  * warranty (none) and distribution info and also the GNU General Public
  6.  * License for more details.
  7.  
  8.  */
  9.  
  10. #ifndef __genop_h
  11. #define __genop_h
  12.  
  13. /* argument types :*/
  14. /* K is kind, S is symbol V is value (const)
  15.  * I is integer, R is ref
  16.  */
  17. #define OP_FLT    1        /* float */
  18. #define    OP_FIX    2        /* fixed (long) */
  19. #define OP_INT    3        /* int */
  20. #define OP_REF    4        /* reference */
  21. #define OP_SYM    5        /* symbol*/
  22. /* op_code is opcode.
  23.  * op_kind is small integer giving adjustment to be made to opcode or
  24.  * small integer giving attribute code (I_ATTRIBUTE), or argument for
  25.  * i_discard_address (always one).
  26.  * op_type gives which operands exist.
  27.  * op_arg is additional argument, usually a symbol but may be an integer
  28.  * const, or (pointer to) explicit ref (Eref).
  29.  */
  30. typedef struct Op_s    *Op;
  31. typedef struct Op_s {
  32.     int    op_code;
  33.     int     op_kind;
  34.     short    op_type;
  35.     union {
  36.         float      arg_flt;
  37.         long      arg_fix;     /* fixed, assume long suffices */
  38.         int          arg_int;
  39.         Explicit_ref  arg_ref;
  40.         Symbol        arg_sym;
  41.     } op_arg;
  42.     char    *op_com;
  43. } Op_s;
  44. extern Op op_new();
  45.  
  46. #endif
  47.